/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package svp;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author 075087
 */
@Entity
@Table(name = "company_tbl")
@XmlRootElement
@NamedQueries({
     @NamedQuery(name = "CompanyTbl.name", query = "SELECT c.companyName FROM CompanyTbl c ORDER BY c.companyName ASC"),
    @NamedQuery(name = "CompanyTbl.code", query = "SELECT c.companyCode FROM CompanyTbl c ORDER BY c.companyCode DESC"),
    @NamedQuery(name = "CompanyTbl.findAll", query = "SELECT c FROM CompanyTbl c"),
    @NamedQuery(name = "CompanyTbl.findByCompanyCode", query = "SELECT c FROM CompanyTbl c WHERE c.companyCode = :companyCode"),
    @NamedQuery(name = "CompanyTbl.findByCompanyTinno", query = "SELECT c FROM CompanyTbl c WHERE c.companyTinno = :companyTinno"),
    @NamedQuery(name = "CompanyTbl.findByCompanyGstno", query = "SELECT c FROM CompanyTbl c WHERE c.companyGstno = :companyGstno"),
    @NamedQuery(name = "CompanyTbl.findByCompanyName", query = "SELECT c FROM CompanyTbl c WHERE c.companyName = :companyName"),
    @NamedQuery(name = "CompanyTbl.findByCompanyAddr", query = "SELECT c FROM CompanyTbl c WHERE c.companyAddr = :companyAddr"),
    @NamedQuery(name = "CompanyTbl.findByCompanyCity", query = "SELECT c FROM CompanyTbl c WHERE c.companyCity = :companyCity"),
    @NamedQuery(name = "CompanyTbl.findByCompanyState", query = "SELECT c FROM CompanyTbl c WHERE c.companyState = :companyState"),
    @NamedQuery(name = "CompanyTbl.findByCompanypostalCode", query = "SELECT c FROM CompanyTbl c WHERE c.companypostalCode = :companypostalCode"),
    @NamedQuery(name = "CompanyTbl.findByCompanycontactPerson", query = "SELECT c FROM CompanyTbl c WHERE c.companycontactPerson = :companycontactPerson"),
    @NamedQuery(name = "CompanyTbl.findByCompanyVat", query = "SELECT c FROM CompanyTbl c WHERE c.companyVat = :companyVat"),
    @NamedQuery(name = "CompanyTbl.findByCompanyphoneNo1", query = "SELECT c FROM CompanyTbl c WHERE c.companyphoneNo1 = :companyphoneNo1"),
    @NamedQuery(name = "CompanyTbl.findByCompanyphoneNo2", query = "SELECT c FROM CompanyTbl c WHERE c.companyphoneNo2 = :companyphoneNo2"),
    @NamedQuery(name = "CompanyTbl.findByCompanyWebsite", query = "SELECT c FROM CompanyTbl c WHERE c.companyWebsite = :companyWebsite")})
public class CompanyTbl implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "company_code")
    private String companyCode;
    @Column(name = "company_tinno")
    private String companyTinno;
    @Column(name = "company_gstno")
    private String companyGstno;
    @Basic(optional = false)
    @Column(name = "company_name")
    private String companyName;
    @Column(name = "company_addr")
    private String companyAddr;
    @Column(name = "company_city")
    private String companyCity;
    @Column(name = "company_state")
    private String companyState;
    @Column(name = "company_postalCode")
    private String companypostalCode;
    @Column(name = "company_contactPerson")
    private String companycontactPerson;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "company_vat")
    private Float companyVat;
    @Column(name = "company_phoneNo1")
    private String companyphoneNo1;
    @Column(name = "company_phoneNo2")
    private String companyphoneNo2;
    @Column(name = "company_website")
    private String companyWebsite;

    public CompanyTbl() {
    }

    public CompanyTbl(String companyCode) {
        this.companyCode = companyCode;
    }

    public CompanyTbl(String companyCode, String companyName) {
        this.companyCode = companyCode;
        this.companyName = companyName;
    }

    public String getCompanyCode() {
        return companyCode;
    }

    public void setCompanyCode(String companyCode) {
        this.companyCode = companyCode;
    }

    public String getCompanyTinno() {
        return companyTinno;
    }

    public void setCompanyTinno(String companyTinno) {
        this.companyTinno = companyTinno;
    }

    public String getCompanyGstno() {
        return companyGstno;
    }

    public void setCompanyGstno(String companyGstno) {
        this.companyGstno = companyGstno;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getCompanyAddr() {
        return companyAddr;
    }

    public void setCompanyAddr(String companyAddr) {
        this.companyAddr = companyAddr;
    }

    public String getCompanyCity() {
        return companyCity;
    }

    public void setCompanyCity(String companyCity) {
        this.companyCity = companyCity;
    }

    public String getCompanyState() {
        return companyState;
    }

    public void setCompanyState(String companyState) {
        this.companyState = companyState;
    }

    public String getCompanypostalCode() {
        return companypostalCode;
    }

    public void setCompanypostalCode(String companypostalCode) {
        this.companypostalCode = companypostalCode;
    }

    public String getCompanycontactPerson() {
        return companycontactPerson;
    }

    public void setCompanycontactPerson(String companycontactPerson) {
        this.companycontactPerson = companycontactPerson;
    }

    public Float getCompanyVat() {
        return companyVat;
    }

    public void setCompanyVat(Float companyVat) {
        this.companyVat = companyVat;
    }

    public String getCompanyphoneNo1() {
        return companyphoneNo1;
    }

    public void setCompanyphoneNo1(String companyphoneNo1) {
        this.companyphoneNo1 = companyphoneNo1;
    }

    public String getCompanyphoneNo2() {
        return companyphoneNo2;
    }

    public void setCompanyphoneNo2(String companyphoneNo2) {
        this.companyphoneNo2 = companyphoneNo2;
    }

    public String getCompanyWebsite() {
        return companyWebsite;
    }

    public void setCompanyWebsite(String companyWebsite) {
        this.companyWebsite = companyWebsite;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (companyCode != null ? companyCode.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CompanyTbl)) {
            return false;
        }
        CompanyTbl other = (CompanyTbl) object;
        if ((this.companyCode == null && other.companyCode != null) || (this.companyCode != null && !this.companyCode.equals(other.companyCode))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "svp.CompanyTbl[ companyCode=" + companyCode + " ]";
    }
    
}
